package simulator.ui;

import java.awt.Image;
import java.io.IOException;
import java.net.URL;

import javax.imageio.ImageIO;

public class ImageLoader
{
   public Image load(String name)
   {
      Image i = null;

      try
      {
         URL url = this.getClass().getClassLoader().getResource(name);
         i = ImageIO.read(url);
      }
      catch (IOException ioe)
      {
         ioe.printStackTrace();
      }

      return i;
   }
}
